package com.only4play.oa.system.controller;

import com.only4play.oa.system.api.domain.SysDept;
import com.only4play.oa.system.service.ISysDeptService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mengdy
 */
@Slf4j
@RestController
@RequestMapping("/dept")
public class SysDeptController {

    @Autowired
    private ISysDeptService deptService;

    /**
     * 根据部门编号获取详细信息
     */
    @GetMapping(value = "/{deptId}")
    public SysDept getInfo(@PathVariable Long deptId){
//        deptService.checkDeptDataScope(deptId);
        return deptService.selectDeptById(deptId);
    }
}
